#!/bin/sh
### BEGIN INIT INFO
# Provides:      jwy-system
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start tim-system at boot time
#Description:    Enable service provided by hb-system
### END INIT INFO


sleep 120

if [ -f /usr/local/bin/data_capture_update ]
then
	echo "update firmware..........."
	rm /usr/local/bin/data_capture
	mv /usr/local/bin/data_capture_update  /usr/local/bin/data_capture
	chmod 777 /usr/local/bin/data_capture
	sync
	echo "update ok."
else
	echo "no new firmwae."
fi


/usr/local/bin/data_capture &


exit 0
